www.gusucode.com > 茶都拼客网全功能版 8 > 茶都拼客网全功能版 8.8源码程序/teasdxmccom/茶都拼客网V8.8(全功能,无限制,完全开源)/Deal_Reg.asp

    <!--#include file="Ku_inc/Ku_sql.asp"-->
<!--#include file="ku_inc/Ku_config.asp"-->
<!--#include file="Ku_conn.asp"-->
<!--#include file="Ku_inc/Ku_md5.asp"-->
<!--#include file="ku_inc/Ku_function.asp"-->
<!--#include file="ku_inc/inc.asp"-->
<%
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if  mid(server_v1,8,len(server_v2))<>server_v2  then
Response.Write "<script>alert(""禁止外部提交,请停止你的非法行为!"");location.href=""javascript:history.back()"";</script>"

else

    username=strLeach(trim(request("username")))
    pass2=strLeach(trim(request("password1")))
    pass1=strLeach(trim(request("password2")))    
    answer=strLeach(trim(request("answer")))    
    key=strLeach(trim(request("key")))    
    sex=strLeach(trim(request("sex")))    
    http=strLeach(trim(request("http")))    
    email=strLeach(trim(request("email")))    
    tel=strLeach(trim(request("tel")))    
    qq=strLeach(trim(request("qq")))    
    address=strLeach(trim(request("address")))   
    
     

    if username="" then 
    Response.Write "<script>alert(""会员名称不能为空!"");location.href=""javascript:history.back()"";</script>"
    Response.end()
    end if

    if len(username)<3 then 
    Response.Write "<script>alert(""会员名称至少4个字符!"");location.href=""javascript:history.back()"";</script>"
    Response.end()
    end if    
    if pass1=pass2 then
    password=md5(pass1)
    else
    Response.Write "<script>alert(""俩次输入密码不一样!"");location.href=""javascript:history.back()"";</script>"
    Response.end()    
    end if
    if answer="" then 
    Response.Write "<script>alert(""问题不能为空!"");location.href=""javascript:history.back()"";</script>"
    Response.end()
    end if    
    if key="" then 
    Response.Write "<script>alert(""问题答案不能为空!"");location.href=""javascript:history.back()"";</script>"
    Response.end()
    end if 
    
    set rsmsg=server.createobject("adodb.recordset")
    sqlmsg="select * from Ku_user where username='"&username&"'"
    rsmsg.open sqlmsg,conn,1,3
    if (rsmsg.eof and rsmsg.bof) then
    rsmsg.addnew
    
    rsmsg("username")=username
    rsmsg("password")=password
    rsmsg("answer")=answer
    rsmsg("key")=key
    rsmsg("http")=http
    rsmsg("email")=email
    rsmsg("tjuser")=request("usertj")
    rsmsg("tel")=tel
    rsmsg("qq")=qq
    rsmsg("address")=address
    rsmsg("sex")=sex     
    rsmsg("jifen")=rsmsg("jifen")+Ku_indexad
    rsmsg("addtime")=now()
    rsmsg("ip")=Request.ServerVariables("REMOTE_ADDR")    
    if Ku_downad=1 then
    rsmsg("shenhe")=1
    end if
    rsmsg.Update
    rsmsg.close

    set rsmsg=nothing

           response.Write("<script>alert(""注册成功,请在用户登陆口进入!!"");location.href=""Index.asp"";</script>")
           else
           Response.Write "<script>alert(""用户名已被占用,请重新填写注册!"");location.href=""javascript:history.back()"";</script>"    
           end if
           end if
%>